10 !************************************************************************* 20 ! 30 ! PROGRAM NAME: rs232ex1.txt 40 ! 50 ! PROGRAM DESCRIPTION: This program verifies that the RS-232 connections 60 ! and interface are functional. 70 ! 80 ! Connect the UNIX workstation to the signal generator using an RS-232 90 ! cable 100 ! 110 ! Run Agilent BASIC, type in the following commands and then RUN the 120 ! program 130 ! 140 !************************************************************************* 150 ! 160 INTEGER Num 170 CONTROL 9,0;1 ! Reset the RS-232 interface 180 CONTROL 9,3;19200 ! Set the baudrate to match the sig gen 190 STATUS 9,4;Stat ! Read the value of register 4 200 Num=BINAND(Stat,7) ! Get the AND value 210 CONTROL 9,4;Num ! Set parity to NONE 220 OUTPUT 9;"*RST" ! Output reset to the sig gen 230 END ! End the program